package com.yaoayao.mall.list.client;

import com.yaoayao.mall.common.result.Result;
import com.yaoayao.mall.model.list.SearchParam;
import com.yaoayao.mall.model.list.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: peiyao
 * @date: 2024/4/14 17:38
 * @description:
 */
@FeignClient(value = "service-list")
public interface ListFeignClient {

    /**
     * 更新商品incrHotScore
     * @param skuId
     * @return
     */
    @GetMapping("/api/list/hotScore/{skuId}")
    Result hotScore(@PathVariable("skuId") Long skuId);

    //开始搜索ES索引库
    @PostMapping("/api/list/search")
    public SearchResponseVo search(@RequestBody SearchParam searchParam);

}
